using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.Mvc;
using System.Web.Mvc.Ajax;
using Universum.Model.Services;
using System.Text;

namespace Universum.Controllers
{
    public class RssController : UniversumController
    {
		IRssService _RssService;
		public RssController (
			System.Security.Principal.IPrincipal principal,
			IRssService rssService)
			:base(principal)
			{
				_RssService = rssService;
			}
        //
        // GET: /Rss/

        public ActionResult Index()
        {
			return Content();
        }

		public ActionResult Content()
		{
			return new ContentResult
			{
				Content = _RssService.GenerateRssContent(),
				ContentEncoding=Encoding.UTF8,
				ContentType="txt/xml"
			};
		}

    }
}
